package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.EsCarInfoDao;
import com.sc.highspeed.db.model.EsCarInfoModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/11/27.
 */
@Service
public class EsCarInfoService {

    @Autowired
    private EsCarInfoDao esCarInfoDao;

    public List<EsCarInfoModel> getEsCarInfoByNumber(String number, String color) {
        return esCarInfoDao.getEsCarInfoByNumber(number, color);
    }

    public List<EsCarInfoModel> getEsCarInfoList(int startRow, int pageSize) {
        return esCarInfoDao.getEsCarInfoList(startRow, pageSize);
    }

    public int insertEsCarInfo(EsCarInfoModel esCarInfoModel) {
       return esCarInfoDao.insertEsCarInfo(esCarInfoModel);
    }

    public int updateEsCarInfoById(EsCarInfoModel esCarInfoModel) {
        return esCarInfoDao.updateEsCarInfoById(esCarInfoModel);
    }

    public int deleteEsCarInfoById(int id) {
        return esCarInfoDao.deleteEsCarInfoById(id);
    }

    public int updateEsCarInfoIsListById(int id, String isList) {
        return esCarInfoDao.updateEsCarInfoIsListById(id, isList);
    }

    public int updateEsCarInfoListById(int id, String list) {
        return esCarInfoDao.updateEsCarInfoListById(id, list);
    }

    public int updateEsCarInfoIsProcessById(int id, String isProcess) {
        return esCarInfoDao.updateEsCarInfoIsProcessById(id, isProcess);
    }

    public int updateEsCarInfoProcessById(int id, String process) {
        return esCarInfoDao.updateEsCarInfoProcessById(id, process);
    }

    public int updateEsCarInfoRemarkById(int id, String remark) {
        return esCarInfoDao.updateEsCarInfoRemarkById(id ,remark);
    }

    public EsCarInfoModel getEsCarInfo(int id) {
        return esCarInfoDao.getEsCarInfo(id);
    }

    public List<EsCarInfoModel> searchEsCarInfo(String startTime, String endTime, String type, String list, int minRmb, int maxRmb, String color, String number) {
        return esCarInfoDao.searchEsCarInfo(startTime, endTime, type ,list ,minRmb, maxRmb, color, number);
    }

    public List<EsCarInfoModel> getHazyEsCarInfo(String number, String color) {
        return esCarInfoDao.getHazyEsCarInfo(number, color);
    }

    public int getEsCarInfoNumber() {
        return esCarInfoDao.getEsCarInfoNumber();
    }

}
